package com.vt.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.vt.admin.api.dto.UserPermissionMiddleTab;
import com.vt.admin.api.dto.user.SysUserFullDto;
import com.vt.admin.api.dto.user.SysUserQueryParam;
import com.vt.admin.api.dto.user.structure.UserOrganStructureItem;
import com.vt.admin.api.entity.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户
 */
public interface SysUserMapper extends BaseMapper<SysUser> {

    List<UserOrganStructureItem> getUserOrganStructure(@Param("id") String id);

    IPage<SysUserFullDto> list(SysUserQueryParam param);

    List<UserOrganStructureItem> queryUserOrganStructure(@Param("list") List<SysUserFullDto> users);

    void deleteCascadeInfo(@Param("uId") String id);

    void insertOrgans(@Param("list") List<UserPermissionMiddleTab> list);

    int insertRoles(@Param("list") List<UserPermissionMiddleTab> list);

    int insertPoss(@Param("list") List<UserPermissionMiddleTab> list);

    void unbindSocial(@Param("id") String id);
}
